package com.ruoyi.store.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.store.mapper.StoShopMapper;
import com.ruoyi.store.domain.StoShop;
import com.ruoyi.store.service.IStoShopService;

/**
 * 店铺信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-04
 */
@Service
public class StoShopServiceImpl implements IStoShopService 
{
    @Autowired
    private StoShopMapper stoShopMapper;

    /**
     * 查询店铺信息
     * 
     * @param id 店铺信息主键
     * @return 店铺信息
     */
    @Override
    public StoShop selectStoShopById(Long id)
    {
        return stoShopMapper.selectStoShopById(id);
    }

    /**
     * 查询店铺信息列表
     * 
     * @param stoShop 店铺信息
     * @return 店铺信息
     */
    @Override
    public List<StoShop> selectStoShopList(StoShop stoShop)
    {
        return stoShopMapper.selectStoShopList(stoShop);
    }

    /**
     * 新增店铺信息
     * 
     * @param stoShop 店铺信息
     * @return 结果
     */
    @Override
    public int insertStoShop(StoShop stoShop)
    {
        stoShop.setCreateTime(DateUtils.getNowDate());
        return stoShopMapper.insertStoShop(stoShop);
    }

    /**
     * 修改店铺信息
     * 
     * @param stoShop 店铺信息
     * @return 结果
     */
    @Override
    public int updateStoShop(StoShop stoShop)
    {
        return stoShopMapper.updateStoShop(stoShop);
    }

    /**
     * 批量删除店铺信息
     * 
     * @param ids 需要删除的店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteStoShopByIds(Long[] ids)
    {
        return stoShopMapper.deleteStoShopByIds(ids);
    }

    /**
     * 删除店铺信息信息
     * 
     * @param id 店铺信息主键
     * @return 结果
     */
    @Override
    public int deleteStoShopById(Long id)
    {
        return stoShopMapper.deleteStoShopById(id);
    }
}
